import pytest
import yagmail,logging
def loc():
    logging.basicConfig(level=logging.DEBUG,
                        format='%(filename)s %(message)s %(levelname)s %(asctime)s %(lineno)d',
                        filename='hj.log',
                        filemode='w+')
    mail=yagmail.SMTP(user='3034738910@qq.com',password='aytttpqxjbbrddjh',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject='测试报告',contents='今日报告请查收')
if __name__ == '__main__':
    pytest.main([r'C:\Users\30347\PycharmProjects\pythonProject1\jiaqizuoye\zuoye2\Test_case.py','-s','--html=baogao.html'])
